#ifndef SRDEMUXTHREAD_H
#define SRDEMUXTHREAD_H


#include <QThread>
#include <mutex>
#include <list>


#include "isrvideoshow.h"

#include "SrAudioThread.h"
#include "SrVideoThread.h"

#include "SrDemux.h"

class SrDemuxThread :public QThread
{
public:
    SrDemuxThread();

    ~SrDemuxThread();

    // 创建对象并打开
    virtual bool Open(const char *url, ISrVideoShow *show);

    // 关闭线程清理资源
    virtual void Close();

    // 启动所有线程
    virtual void Start();

    void run();
private:
    std::mutex _mux;
    SrDemux*m_movie_demux ;
    SrVideoThread *_vt;
    SrAudioThread *_at;

    bool _isExit;
};

#endif // SRDEMUXTHREAD_H
